package action;

import java.util.List;

import model.ProjectInfo;
import model.TeamInfo;
import model.User;

import com.opensymphony.xwork2.ActionContext;

import action.base.BaseAction;

public class SelfGetTeamInfo extends BaseAction {
	private User user;
	private TeamInfo teamInfo;
	public TeamInfo getTeamInfo() {
		return teamInfo;
	}
	public void setTeamInfo(TeamInfo teamInfo) {
		this.teamInfo = teamInfo;
	}
	public String execute() throws Exception{
		ActionContext ctx = ActionContext.getContext();
		user = (User)ctx.getSession().get("USER");
		List<TeamInfo> t = mgt.getTeamInfoByUser(user);
		if(t.size()>0){
			ctx.getSession().put("T", t);
			return "input";
		}else{
			return "input";
		}
	}
}
